<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <style>
        /*弹窗*/
        body {
            background: transparent;
        }
        .popBox{
          padding: 0 1rem;
          height: 100%;
          background: #fff;
          top:0;
          width: 100%;
        }
        .popBox .success{
          text-align: center;
          padding-bottom: 1.2rem;
          color: #444;
        }
        .popBox .success .text{
          padding-top: 0.6rem;
          font-size:0.7rem;
        }
        .popBox .success div > img{
          height: 2.1rem;
          margin: 0 auto;
          width: 2rem;
        }
        .bomBtn{
          padding: 0 0.75rem;
          margin-top:1.2rem;
        }
        .bomBtn > div{
          width: 7rem;
          height: 2rem;
          line-height: 2rem;
          background: #E73550;
          font-size: 0.6rem;
          border-radius: 0.2rem;
          color: #fff;
          text-align: center;
        }
        .bomBtn > div.frist{
          margin-right: 0.7rem;
        }
        @media (max-width:320px)  {
          .bomBtn > div{
            width: 6rem;
          }
          .bomBtn > div.frist{
            margin-right: 0.45rem;
          }
        }
        @media (max-width:360px)  {
          .bomBtn > div{
            width: 6rem;
          }
          .bomBtn{
            padding: 0 0.35rem;
          }
        }
    </style>
</head>

<body>
    <div class="popOverlay" tapmode onClick="closeFrame();"></div>
    <div class="popBox">
      <div class="aui-bar aui-bar-nav" id="header">
            <div class="aui-pull-left close" tapmode onclick="closeFrame()"></div>
        </div>
        <div class="success">
          <div><img src="../image/common/17.png" alt=""></div>
          <div class="text">支付成功</div>
          <div class="text-bold aui-font-size-20" id="price">￥0.00</div>
        </div>
        <div class="bomBtn aui-flex-col aui-flex-center">
          <div class="frist" tapmode onclick="openGiftVip()">继续购买</div>
          <div tapmode onClick="openOrder()">查看订单</div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../script/import.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript">
    apiready = function() {
        api.parseTapmode();
    		var header = $api.byId('header');
    		$api.fixStatusBar(header);
        var price = api.pageParam.price;
        if(price){
          $$('#price').text(price)
        }

        // api.addEventListener({
        //     name: 'myEvent'
        // }, function(ret, err){
        //     if( ret ){
        //          $$('#price').text(ret.value.price)
        //     }else{
        //          alert( JSON.stringify( err ) );
        //     }
        // });

    };
    function closeFrame(){
      api.sendEvent({
          name: 'closeDetailEvent'
      });
      api.closeFrame();

    }
    function openOrder(){
        api.openWin({
            name: 'order1_win',
            url: 'mine/order1_win.html',
            pageParam: {
                name: 'test'
            }
        });
        // api.closeToWin({
        //     name: 'root'
        // });

    }
function openGiftVip(){
  api.openWin({
      name: 'order1_win',
      url: 'gift/gift_index_win.html',
      pageParam: {
          name: 'test'
      }
  });
}
</script>

</html>
